package com.enumeration.demo01;

public class Test02 {
    public static void main(String[] args) {
        System.out.println("开始测试！");
        // 随机数 1 ~ 6
        int num = (int)(Math.random()*10)%6+1;
        Week day = null;
        if (num < 3) {
            day = Week.MON;
        } else if(num >= 3) {
            day = Week.SUN;
        }
        System.out.println(day == Week.MON);// true
        System.out.println(day.equals(Week.MON)); // true
        Week w = Week.SUN;
        Week k = Week.SUN;
        System.out.println(w == k); // true
        System.out.println(w.equals(k)); // true
    }
}
